﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FunArts.EasyDevOps.Shared.Models.SshClient.KeepAlivedClient
{
    /// <summary>
    /// VRRP脚本配置
    /// </summary>
    public class VrrpScript
    {
        /// <summary>
        /// 脚本名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 要执行的脚本或命令
        /// </summary>
        public string Script { get; set; }

        /// <summary>
        /// 执行间隔(秒)
        /// </summary>
        public int Interval { get; set; } = 2;

        /// <summary>
        /// 权重值
        /// </summary>
        public int Weight { get; set; } = 2;

        /// <summary>
        /// 连续失败多少次认为服务不可用
        /// </summary>
        public int Fall { get; set; } = 2;

        /// <summary>
        /// 连续成功多少次认为服务恢复
        /// </summary>
        public int Rise { get; set; } = 1;

        /// <summary>
        /// 执行超时时间(秒)
        /// </summary>
        public int Timeout { get; set; } = 2;
    }
}
